package fiuba.algo3.modelo;

public class Posicion{

	private int X;
	private int Y;
	
	public Posicion(){
		this.X = 0;
		this.Y = 0;
	}
	
	public Posicion(int nuevaX, int nuevaY){
		this.X = nuevaX;
		this.Y = nuevaY;
	}
	
	public int getX (){
		return this.X;
	}

	public int getY(){
		return this.Y;
	}
	
	public static Posicion crearPosicionAleatoria(int ancho, int alto){
		int x = (int) (Math.random() * (ancho-1));
		int y = (int) (Math.random() * (alto-1));
		return new Posicion(x,y);
	}
	
	public boolean equals(Posicion posicion){
		return (X == posicion.X && Y == posicion.Y);
	}
}